#include "Tab_Test.h"
std::map<int, Tab_Test*> *Tab_Test::s_pListTab_Test= NULL;
void Tab_Test::LoadTable() {
if(s_pListTab_Test== NULL){
s_pListTab_Test= new std::map<int, Tab_Test*>();
std::ifstream ifs("TableData/Tab_Test.txt");
std::string strCur;
while(getline(ifs, strCur)) {
Tab_Test *pNewTable = new Tab_Test();
pNewTable->LoadData(strCur);
s_pListTab_Test->insert(std::make_pair(pNewTable->GetID(), pNewTable));
}
}
}
void Tab_Test::LoadData(const std::string &strData) {
std::stringstream ss(strData);
int enumValue = 0;
ss>>m_ID;
ss>>m_Name;
ss>>m_Power;
ss>>m_Storm;
ss>>enumValue;
m_Type = (eType)enumValue;
ss>>enumValue;
m_Attack = (eAttack)enumValue;
}
